<template>
  <div id="app">
    <v-header v-if="showHeader"></v-header>
    <router-view v-on:header='header' v-on:footer='footer' />
    <v-footer v-if="showFooter"></v-footer>
  </div>
</template>
<script>
import header from './components/header.vue'
import footer from './components/footer.vue'
export default {
  name: 'App',
  data() {
    return {
      showHeader: true,
      showFooter: true,
    }
  },
  components: {
    'v-header': header,
    'v-footer': footer,
  },
  methods: {
    //是否显示头部
    header: function(bool) {
      this.showHeader = bool;
    },
    //是否显示底部
    footer: function(bool) {
      this.showFooter = bool;
    }
  }
}

</script>
<style>
body,
html {
  margin: 0;
  height: 100%;
}

#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  height: 100%;
}
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-thumb { //滑块部分
  border-radius: 5px;
  background-color: rgb(175, 74, 240);
}
::-webkit-scrollbar-track { //轨道部分
  box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
  background: #ededed;
  border-radius: 5px;

}
</style>
